/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.tygzs.minerpg.Configuration.Team;

import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.scoreboard.Team;

/**
 *
 * @author thtTNT
 */
public class TeamInfo
{

    private final Team team;

    public TeamInfo(Team team)
    {
        this.team = team;
    }

    /**
     * @return the name
     */
    public String getName()
    {
        return team.getName();
    }

    /**
     * @return the mumber
     */
    public Set<OfflinePlayer> getMumber()
    {
        return team.getPlayers();
    }

    public void addPlayer(OfflinePlayer player)
    {
        team.addPlayer(player);
    }

    public void addPlayer(String player)
    {
        addPlayer(Bukkit.getOfflinePlayer(player));
    }

    public void removePlayer(String player)
    {
        removePlayer(Bukkit.getOfflinePlayer(player));
    }

    public void removePlayer(OfflinePlayer player)
    {
        team.removePlayer(player);
    }

    public String getPerfix()
    {
        return team.getPrefix();
    }

    public String getSuffix()
    {
        return team.getSuffix();
    }

    public void unRegister()
    {
        team.unregister();
    }
}
